package com.huaxin.hxmodulesystem.mapping;

import com.huaxin.hxmodulesystem.dto.request.AddUserReqDTO;
import com.huaxin.hxmodulesystem.dto.request.UpdateUserReqDTO;
import com.huaxin.hxmodulesystem.models.User;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

@Mapper(componentModel = "spring")
public interface UserMapping {

    User toEntity(AddUserReqDTO in);

    void updateEntity(UpdateUserReqDTO in, @MappingTarget User entity);
}